package br.com.felix.fwt.svg.mask;

import java.util.ArrayList;
import java.util.List;

import br.com.felix.fwt.svg.SVG;
import br.com.felix.fwt.svg.SVGBuilder;
import br.com.felix.fwt.svg.SVGId;

public class SVGMask implements SVG{

	private int x, y, width, height;
	private SVGId id;
	private SVGMaskContentUnits maskContentUnits;
	private SVGMaskUnits maskUnits;
	private List<SVG> shapes;
	
	public SVGMask(){
		shapes = new ArrayList<SVG>();
	}
	
	@Override
	public void toSVG(SVGBuilder svgBuilder) {
		svgBuilder.createElement("mask")
			.id(id)
			.x(x)
			.y(y)
			.width(width)
			.height(height)
			.attribute("maskContentUnits", maskContentUnits)
			.attribute("maskUnits", maskUnits)
			.bodyWithChildren(shapes)
			.endElement();
	}

}
